home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / B-C / Color Window Demo / adjust TE rect.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-31  |  570 b   |  17 lines  |  [TEXT/KAHL]

  1. #include "my color.h"
  2.  
  3. adjust_TE_rect(a_window)        /* This routine is called from the "do mouse" routine,
  4.                                     Here I will re-size the TE view 
  5.                                     rectangle after the user has "grown" the window */
  6. CWindowPtr    a_window;
  7. {
  8. register TEHandle    the_text;
  9.  
  10.     the_text = (TEHandle)((CWindowPeek)a_window)->refCon;
  11.     (**the_text).viewRect = a_window->portRect;
  12.     (**the_text).viewRect.right = (**the_text).viewRect.right - BAR_WIDTH;
  13.     (**the_text).viewRect.bottom = (**the_text).viewRect.bottom - BAR_WIDTH;
  14.     InsetRect(&(**the_text).viewRect, 4, 0);
  15.     TECalText(the_text);
  16. }
  17.